package cn.wolfcode.trip.base.domain;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.*;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties("handler")
public class StrategyComment extends BaseDomain {
    private User user;
    private String comment;
    private Strategy strategy;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss", timezone = "GMT+8")
    private Date createTime;
    private String coverUrl;
    private Integer state;//点评星级
    private List<StrategyCover> images = new ArrayList<>();//多张点评图片
    private int likeCount;


    /*public Object getJson(){

        Map<String,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("userId",user.getId());
        map.put("userName",user.getNickName());
        map.put("comment",comment);
        map.put("createTime",createTime);
        map.put("coverUrl",coverUrl);
        map.put("state",state);

        return JSON.toJSONString(map);
    }*/
}
